import 'dart:async';

import 'package:card_swiper/card_swiper.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:whale/helper/utils/img_util.dart';

import '../../../../helper/component/carousel_text.dart';
import '../../../../helper/utils/color.dart';
import '../logic.dart';

class HotPeopleWidget extends GetView<HomeLogic> {
  HotPeopleWidget({Key? key}) : super(key: key);

  Widget _buildItems(
    String text, {
    Function()? onTap,
  }) {
    return InkWell(
      onTap: onTap,
      child: Text(
        text,
        style: TextStyle(color: Colors.white, fontSize: 13.sp),
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 32.r,
      margin: EdgeInsets.fromLTRB(15.r, 12.r, 15.r, 0),
      padding: EdgeInsets.symmetric(horizontal: 8.r),
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(2.r),
          color: const Color(0xffE9EDF5)),
      child: Row(
        children: [
          Image.asset(
            'tongzhi.png'.imgPathHome,
            width: 37.5.r,
            height: 19.5.r,
          ),
          Expanded(
              child: CarouselText(
            list: controller.state.carouselData!,
            lineCount: 1,
            height: 32.r,
            color: ColorsUtil.title,
          )),
        ],
      ),
    );
  }
}
